{$header}<div id="main" class="main" >
    <div class="content">
  <h3 class="heading">新增满赠规则 [ <a href="__URL__">返回列表</a> ]</h3>
<div id="result" class="result none"></div>
<form class="form-horizontal well" method='post' name="form1" id="form1" action="__URL__/insert/">
<table cellpadding=3 cellspacing=3 >
<tr>
    <td>购物金额</td>
    <td>
    <input name="jumpUrl" value="__URL__" type="hidden" />
    <input name="create_time" value="{:time()}" type="hidden" />
    <input id="" name="quota" type="text" /> 元 <span class="alert alert-info">超过此购物金额，即送赠品</span> </td>

</tr>
<tr>
    <td class="tRight" >适用品牌范围：</td>
    <td class="tLeft" >
           <div class="controls">
            <select name="brand_id[]" multiple="multiple" style="height:500px">
                <volist name="brands" id="brand">
                    <option value="{$brand.id}">{$brand.name}</option>
                </volist>
                
            </select>
            </div>
        </td>
    </tr>
<tr>
	<td class="tRight" >平台</td>
	<td class="tLeft" >{:modList('Order_source',3)}  </td>
</tr>

<tr>
    <td class="tRight">可选赠品：</td>
        <td>
            <table class="table  table-bordered table-striped span11" id="checkList">
                <?php $gifts= M('Gift')->where('status = 1')->findAll(); ?>
                <tr> <td> </td> <td colspan="2">赠品组合</td> </tr>
                <volist name="gifts" id="go">
                    <tr>
                        <td><input type="radio" value='{$go.id}' name="gift_id" ></td>
                        <td>{$go.name}</td>
                        <td>
                           <table id="chosed_product" class="table">
                            <thead><th>赠品标题</th><th>商品名称</th> <th>售价</th><th>数量</th><th>单位</th><th>库存</th></tr></thead>
                            <?php $gift_details = M('Gift_detail')->where('gift_id = '.$go['id'])->findAll(); ?>
                            <volist name="gift_details" id="gd">
                                <tr>
                                    <td class="span2">{$gd.name}</td>
                                    <td class="span2">{$gd.goods_id|getModelName='Product'}</td>
                                    <td>{$gd.price}</td>
                                    <td>{$gd.number}</td>
                                    <td>{$gd.goods_id|getProductUnit}</td>
                                    <td>{$gd.goods_id|getDStock}</td>
                                </tr>
                            </volist>

                            </table> 
                        </td>
                    </tr>
                </volist>  
            </table>

            
        </td>
</tr>
<tr>
    <td class="tRight">备注说明：</td>
        <td class="tLeft"><textarea class="span8" name="remark" rows="3"></textarea>
        </td>
</tr>
<tr>
	<td></td>
	<td class="center">
	<button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> 保存</button>
	<a class="btn btn-primary offset1" href="__URL__"><i class="icon-arrow-left icon-white"></i>返回</a>
	</td>
</tr>
</table>
</form>
</div>
</div>
<include file="Public:footer"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Js/easyui/themes/default/easyui.css">
<script type="text/javascript" src="__PUBLIC__/Js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/filter-product.js"></script>
